import { v4 as uuid } from 'uuid';
import del from './atom/db/del';

declare const action_id: string;
declare const session_id: string;
declare const spaceid: string;

interface Message {
	_id: string;
}


async function atom(msg: Message) {
	const systemid = '5981';
	const { prepare, exec } = del(action_id, session_id, spaceid, systemid);
	prepare('exam_date', [{ _id: msg._id }]);
	const ret = await exec();
	if (ret.code === 1) {
		return 'success';
	} else {
		return 'fail';
	}
}
